package com.ruoyi.fjtseac.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.xss.Xss;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * 志愿者申请对象 application_form
 * 
 * @author ruoyi
 * @date 2022-07-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="志愿者申请对象", description="")
public class ApplicationForm
{
    private static final long serialVersionUID = 1L;

    /** id */
    @ApiModelProperty(value = "志愿者申请编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 姓名 */
    @Pattern(regexp = "[\\u4E00-\\u9FA5]{1,80}",message = "名字必须为汉字，且不存在空格")
    @ApiModelProperty(value = "姓名")
    @Excel(name = "姓名")
    private String name;

    /** 性别 */
    @Pattern(regexp = "[男]|[女]",message = "请输入正确性别（男/女）")
    @ApiModelProperty(value = "性别")
    @Excel(name = "性别")
    private String gender;

    /** 手机号码 */
    @Pattern(regexp = "^134[0-8]\\d{7}$|^13[^4]\\d{8}$|^14[^2,3]\\d{8}$|^15[^4]\\d{8}$|^16[2,5,6,7]\\d{8}$|^17[0-8]\\d{8}$|^18[\\d]{9}$|^19[^4]\\d{8}$", message = "请输入正确号码")
    @ApiModelProperty(value = "手机号码")
    @Excel(name = "手机号码")
    private String phone;


    @ApiModelProperty(value = "拒绝理由")
    private String reason;

    @ApiModelProperty(value = "存在状态")
    private Integer flag;

    @ApiModelProperty(value = "用户openId")
    private String openId;

    @ApiModelProperty(value = "管理员操作时间")
    private Date operationTime;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("gender", getGender())
            .append("phone", getPhone())
            .append("flag",getFlag())
            .append("openId",getOpenId())
            .toString();
    }
}
